Welcome to buy time in three hours.
Hello, everyone, this is like five numpty and pandas for data processing.
By the end of this lecture, you will be able to import numpty and pandas in Python, implement nanpa
and pandas to some extent, and load and save data in Python using non-pay.
OK, let's talk about importing libraries.
Python, similar to other programming languages, has a good number of different libraries for data
processing, image processing, signal processing, machine learning, etc..
One of the most popular libraries is No.
Other one is pundit's.
In order to import these two libraries or any library, you simply use the keyword import and then put
the name of the library over there.
You can always import a library using a preferred name.
ENPI is a popular name for non-pay, also for Ponder's people using PDA.
But you can use any name that you are more comfortable with when you are typing and writing your script
lizarazo and now your libraries are imported into your Python notebook.
OK, once you import a library, they usually come up with different branches of classes, methods,
functions or attributes.
For example, nanpa includes many important functions and to count those functions, you simply put
a dot here and then you see a list of different functions, attributes and also classes or methods.
So the functions usually come with this icon gear.
And for example, APS is a function that computes for you the absolute value of a value or an array.
For example, in the array is a method or class.
If you type in the area, you see the icon is like that.
And these and the array, if you put a dot right after it, it comes with another list of functions,
attributes and classes that you could call.
So it's like branches of different libraries and functions that popping up when you use this format
of calling them.
Another important function that you can use using the PANDAS library is read, underlined CSFI and within
the Prentice's, you can import Depass to the CSU file that you want to be uploaded.
OK, let's focus on non-pay for the time being.
At the beginning we talked about popular functions and attributes.
Anupong, let's open this cell.
These are some examples of popular functions in Napa, which you can call them and use them for both
arrays and singular values.
I put them in a form of print function.
Then everything's going to be organized printing for you and I run this cell.
So the first one is now that floor function, which computes the floor of this three point six values,
which is three here, the cell function, the sale of three point six is for the absolute function,
minus three point for the absolute value is three point for the PI value, which is three point fourteen
fifteen ninety two and go on.
And the value is basically an attribute.
And this is an example of an attribute coming with a function, design function, cosine function,
exponential function, standard logarithm function and natural logarithm function.
They are all coming here and they are popular functions in non-pay.
There are other popular functions that you can always investigate by putting an that and see the list
of different functions and attributes and other things that are popping up and then educate yourself
over there.
But these are the popular ones.
OK, let's talk about non-appearance here.
We are trying to define some areas for you, arrays or mattresses, including many values, as you know.
So if you use the class or method random, you can use the round function to generate random values
between zero and one.
And here you define the shape of your area or matrix.
So in this example, my X1 has a shape of referrals and five columns of random values between zero and
one.
When you want to actually call random functions, it's always recommended to define a random seat.
Then your random values are going to be from a new set of random values.
And within this sit function of random class or method, you put an integer here and here.
I put forty three and then we generate random values here with different shapes for X1, x2 and x3.
Also you can define a matrix of empty values using empty, open and close pantazis.
And here you define the shape of that empty matrix as a form of a tuple.
Also, you can define a matrix of all one's value like this, another tuple, which is the shape of
your all one's matrix, and here a matrix of zero values.
And we're going to print them in an organized way here.
Let's try to sell for you.
And as you see here, these are the different random mattresses or no arrays.
And here is my empty array, which actually includes a very small values.
But it's basically consider empty in.
Umpire lingo, this is my once mattress and this is my Xeros, as you see that nanpa uses brackets to
show no errors.
So these are not lists because if I just open a cell here and type type, for example, X1, it tells
you it's an umpire.
So it's not a list, but it shows it for you using its brackets.
OK, here is an example of operations on ARRY.
So for example, if you want to compute the standard logarithm of all the values in our X1 matrix or
array, you can use the log function operagoers fantasies and put that array within it.
Also here you can use the shape function to find the shape or size for a number of rows, a number of
columns of your particular animatics.
You can also compute a minimum and maximum values of a particular array across a particular axis.
And in this example, at zero is for horizontal axis and axis, one is for the vertical axis.
So here we are computing the minimum value of X1 across the horizontal axis and maximum value of X1
across the vertical axis and save them into these two variables.
You can also compute the transpose of a matrix using the transpose function like this.
We are just printing them here in an organized way for you.
So let's run this cell and here we go once you create a number.
It also comes with some functions.
So if you just type X1 and put a dot here and then type shape, this is kind of an attribute corresponding
to X1.
So instead of using nonpaid that shape function, we are using this shape as an attribute that is attached
to our X1 array.
So and this way you are basically saving some characters when you are typing your code or writing your
scripts.
And here is another example for the mean function which you just defined the axis that you want the
minimum values to be computed with respect to.
And here is the max function, which we go for Axis one, and here is the transpose function, which
is open and close Pantazis.
And you don't need to define anything within it.
If I run the.
It actually gives you the same values, mattresses and also the tuple corresponding to shape, as you
see in this previous set.
Let's take a break and then continue to the next part of this lecture.